package com.mall507.fivepeaks.widget.xdialog;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.mall507.fivepeaks.R;

public class XDaialogPopu extends Activity {
	private LinearLayout layout;
	private TextView textView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.view_exit_dialog);
		setTheme(R.style.popuwindow);
		layout = (LinearLayout) findViewById(R.id.exit_layout);
		textView=(TextView)findViewById(R.id.textView);
		textView.setText(getIntent().getStringExtra("msg"));
		layout.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Toast.makeText(getApplicationContext(), "提示：点击窗口外部关闭窗口！",Toast.LENGTH_SHORT).show();
			}
		});
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		finish();
		return true;
	}

	public void exitbutton1(View v) {
		finish();
	}

}
